/**
 * clock moudle api
 */

import base from "./base";
import axios from "@/utils/axios";

const clock = {
  getClockSituation(number, params) {
    return axios.get(base.appBaseUrl + '/clocksituations/' + number, {
      params: params
    });
  },
  getClock(params){
    return axios.get(base.appBaseUrl + '/ClockSituation/today/departmentid', {
      params: params
    });
  },
  getPeriod(params){
    return axios.get(base.appBaseUrl + '/periodData', {
      params: params
    });
  },
  getTwoWeeks(params){
    return axios.get(base.appBaseUrl + '/everydayclock/twoweeks', {
      params: params
    });
  },
  updateClock(id, number, params) {
    return axios.put(base.appBaseUrl + '/everydayclocks/' + id + '/' +number, null, {
      params: params
    });
  },
}

export default clock;
